<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

	<div th:fragment="head">
		<div style="display: flex;position: fixed;background-color: #8CC5FF;width: 100%;height: 76px;margin-top: -10px;z-index: 999;">
			<div style="width: 77vw;">
				<img src="/image/logo.png" />
			</div>
			<div>
				<div th:if="${session.SPRING_SECURITY_CONTEXT}!=null">
					<el-dropdown trigger="click">
						<span class="el-dropdown-link" style="cursor: pointer;">
							<el-avatar :size="55">
								<img th:src="@{'/api/public/show/'+${session.SPRING_SECURITY_CONTEXT.authentication.principal.pictureId}}" />
							</el-avatar>
						</span>
						<span style="color: black;"
							th:text="${session.SPRING_SECURITY_CONTEXT.authentication.principal.nickname}"></span>
							<a href="/api/admAndcons/logOut" style="text-decoration: none;">
								<span style="color: red;font-size: 10px;">退出</span>
							</a>
						<el-dropdown-menu style="margin-top: -15px;margin-left: 5px;" slot="dropdown">
							<el-dropdown-item>
								<a style="font-size: 10px;text-decoration: none;color: lightgrey;" href="/">主页</a>
							</el-dropdown-item>
							<el-dropdown-item>
								<a style="font-size: 10px;text-decoration: none;color: lightgrey;" href="/api/cons/user/go2Info">个人信息</a>
							</el-dropdown-item>
							<el-dropdown-item>
								<a style="font-size: 10px;text-decoration: none;color: lightgrey;" href="/api/cons/blog/go2FindMyBlogs">我的博客</a>
							</el-dropdown-item>
							<el-dropdown-item>
								<a style="font-size: 10px;text-decoration: none;color: lightgrey;" href="/api/cons/blog/go2PublishBlog">发表博客</a>
							</el-dropdown-item>
							<el-dropdown-item>
								<a style="font-size: 10px;text-decoration: none;color: lightgrey;" href="/api/cons/blog/go2MyLikes">我的点赞</a>
							</el-dropdown-item>
							<el-dropdown-item>
								<a style="font-size: 10px;text-decoration: none;color: lightgrey;" href="/api/cons/blog/go2MyFavourites">我的收藏</a>
							</el-dropdown-item>
						</el-dropdown-menu>
					</el-dropdown>
				</div>
				<div th:if="${session.SPRING_SECURITY_CONTEXT}==null">
					<span style="font-size: 10px;">[</span>
					<span style="font-size: 10px;"><a href="/api/public/user/go2Login">登录</a></span>
					<span style="font-size: 10px;">·</span>
					<span style="font-size: 10px;"><a href="/api/public/user/go2Add">注册</a></span>
					<span style="font-size: 10px;">]</span>
				</div>
			</div>
		</div>
	</div>
</html>
